package com.ma.server.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ma.Dao.LoginDao;
import com.ma.entity.Student;
import com.ma.entity.StudentVO;
import com.ma.server.LoginServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ProjectName: project
 * @Package: com.ma.server.Impl
 * @ClassName: LoginServerImpl
 * @Author: YHHHH
 * @Description:
 * @Date: 2021/3/9 16:57
 * @Version: 1.0
 */
@Service
public class LoginServerImpl implements LoginServer {

    @Autowired
    private LoginDao loginDao;

    @Override
    public Student findLoginStudent(String studentNumber) {
        Student loginStudent = loginDao.findLoginStudent(studentNumber);
        if (loginStudent==null){
            return null;
        }else {
            return loginStudent;
        }
    }

    @Override
    public StudentVO loginText(String number) {
        StudentVO studentVO = loginDao.loginText(number);
        return studentVO;
    }

    @Override
    public String findOneStudentName(String number) {
        String oneStudentName = loginDao.findOneStudentName(number);
        return oneStudentName;
    }
}
